package main

import "fmt"

func main() {
	j, i, s := 0, 0, 0
	fmt.Println("100以内斐波那切数列：")
	for {
		if s > 100 {
			break
		}
		switch {
		case i < 1:
			i++
			j = i
			fmt.Printf("%d %d ", i, j)
			s = i + j
		case i >= 1:
			fmt.Printf("%d ", s)
			j = i
			i = s
			s = i + j
		}
	}
}
